From: Chuck Date: Thu, 19 Dec 2019 19:00:51 +0000 (-0800) Subject: extension-tool: Don't treat missing .js handler as error X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~291 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d1f87ca115c9f7a51a24ce37eef0062ba6069b64;p=gnome-shell.git extension-tool: Don't treat missing .js handler as error After creating a new extension, we try to open the main source file with the default handler, which fails when there is none. But given that the extension was created successfully, don't treat a missing handler as failure, and print the path to the new extension instead. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/905 --- diff --git a/subprojects/extensions-tool/src/command-create.c b/subprojects/extensions-tool/src/command-create.c index 13549643d..2c140bba0 100644 --- a/subprojects/extensions-tool/src/command-create.c +++ b/subprojects/extensions-tool/src/command-create.c @@ -118,9 +118,14 @@ launch_extension_source (GFile *dir, GError **error) GList l; main_source = g_file_get_child (dir, "extension.js"); - handler = g_file_query_default_handler (main_source, NULL, error); + handler = g_file_query_default_handler (main_source, NULL, NULL); if (handler == NULL) - return FALSE; + { + /* Translators: a file path to an extension directory */ + g_print (_("The new extension was successfully created in %s.\n"), + g_file_peek_path (dir)); + return TRUE; + } l.data = main_source; l.next = l.prev = NULL;